<!--#include file="CheckSession.asp"-->
<!--#include file="../inc/PublicFun.Asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
    <title>��̨����</title>
    <link href="css/style.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<%

strAction = Request("action")
	strId = Request("Id")
	If strAction = "s" then
			
		t1 = trim(request . Form("t1"))
		t2 = trim(request . Form("t2"))
		t3 = trim(request . Form("t3"))
		t4 = trim(request . Form("t4"))
	
		t5 = trim(request . Form("t5"))
		t6 = trim(request . Form("t6"))
		t7 = trim(request . Form("t7"))
		t8 = trim(request . Form("t8"))
		
		t9 = trim(request . Form("t9"))
		t10 = trim(request . Form("t10"))
		t11 = trim(request . Form("t11"))
		
		colorPicker1 = trim(request . Form("colorPicker1"))
		colorPicker2 = trim(request . Form("colorPicker2"))
		colorPicker3 = trim(request . Form("colorPicker3"))
		colorPicker4 = trim(request . Form("colorPicker4"))
		
		colorPicker5 = trim(request . Form("colorPicker5"))
		colorPicker6 = trim(request . Form("colorPicker6"))
		colorPicker7 = trim(request . Form("colorPicker7"))
		colorPicker8 = trim(request . Form("colorPicker8"))
	
		colorPicker9 = trim(request . Form("colorPicker9"))
		colorPicker10 = trim(request . Form("colorPicker10"))
		colorPicker11 = trim(request . Form("colorPicker11"))
	
		s1 = trim(request . Form("s1"))
		s2 = trim(request . Form("s2"))
		s3 = trim(request . Form("s3"))
		s4 = trim(request . Form("s4"))
		
		s5 = trim(request . Form("s5"))
		s6 = trim(request . Form("s6"))
		s7 = trim(request . Form("s7"))
		s8 = trim(request . Form("s8"))
	
		s9 = trim(request . Form("s9"))
		s10 = trim(request . Form("s10"))
		s11 = trim(request . Form("s11"))
		
	
		strAlert = "�޸ĳɹ�"

	
	
		Set Rs = Server . CreateObject("Adodb.RecordSet")
		If strId = "" Then
			Sql = "Select * from info"
		Else
			Sql = "Select * from info where Id=" & strId & ""
		End If
    Rs . open Sql,Conn,1,3
			If strId = "" Then
				Rs . AddNew
				strAlert = "��ӳɹ�"
			End If
Rs("s1") = s1
Rs("s2") = s2
				Rs("s3") = s3
				Rs("s4") = s4
				Rs("s5") = s5
				Rs("s6") = s6
				Rs("s7") = s7
				Rs("s8") = s8
				Rs("s9") = s9
				Rs("s10") = s10
				Rs("s11") = s11

				Rs("colorPicker1") = colorPicker1
				Rs("colorPicker2") = colorPicker2
				Rs("colorPicker3") = colorPicker3
				Rs("colorPicker4") = colorPicker4
				Rs("colorPicker5") = colorPicker5
				Rs("colorPicker6") = colorPicker6
				Rs("colorPicker7") = colorPicker7
				Rs("colorPicker8") = colorPicker8
				Rs("colorPicker9") = colorPicker9
				Rs("colorPicker10") = colorPicker10
				Rs("colorPicker11") = colorPicker11
				

				Rs("t1") = t1
				Rs("t2") = t2
				Rs("t3") = t3
				Rs("t4") = t4
				Rs("t5") = t5
				Rs("t6") = t6
				Rs("t7") = t7
				Rs("t8") = t8
				Rs("t9") = t9
				Rs("t10") = t10
				Rs("t11") = t11
								
				Rs("Times") = Now()
		Rs . Update
		Rs . Close()
		Set Rs = Nothing
		Response . Write("<script language='javascript'>alert('" & strAlert & "');window.location.href='Admin_InfoAdd.Asp'</script>")
	End If

If strId <> "" Then
		Set Rs = Server . CreateObject("Adodb.RecordSet")
		Sql = "Select * from info where Id=" & strId & ""
		Rs . open Sql,Conn,1,3
			If Not(Rs . Eof And Rs . Eof) then
				t1 = Rs("t1")
				t2 = Rs("t2")
				t3 = Rs("t3")
				t4 = Rs("t4")
				t5 = Rs("t5")
				t6 = Rs("t6")
				t7 = Rs("t7")
				t8 = Rs("t8")
				t9 = Rs("t9")
				t10 = Rs("t10")
				t11 = Rs("t11")
				
				
				
				colorPicker1 = Rs("colorPicker1")
				colorPicker2 = Rs("colorPicker2")
				colorPicker3 = Rs("colorPicker3")
				colorPicker4 = Rs("colorPicker4")
				colorPicker5 = Rs("colorPicker5")
				colorPicker6 = Rs("colorPicker6")
				colorPicker7 = Rs("colorPicker7")
				colorPicker8 = Rs("colorPicker8")
				colorPicker9 = Rs("colorPicker9")
				colorPicker10 = Rs("colorPicker10")
				colorPicker11 = Rs("colorPicker11")
				
				


				s1 = Rs("s1")
				s2 = Rs("s2")
				s3 = Rs("s3")
				s4 = Rs("s4")
				s5 = Rs("s5")
				s6 = Rs("s6")
				s7 = Rs("s7")
				s8 = Rs("s8")
				s9 = Rs("s9")
				s10 = Rs("s10")
				s11 = Rs("s11")

												
			End If
    Rs . Close()
Set Rs = Nothing
	End If
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td height="50" align="center" class="title">�����Ϣ</td>
    </tr>
</table>
<div>&nbsp;</div>
<table width="100%" border="1" align="center" cellpadding="5" cellspacing="0" style="border-collapse:collapse">
    <form action="?action=s&Id=<%= strId %>" method="post" name="form1">
        <tr>
            <td width="150" align="right" nowrap>����</td>
            <td nowrap><input name="t1" id="t1" class="inputtext" value="<%= t1 %>" type="text" style="width:200px">
                <input type="text" name="colorPicker1" id="colorPicker1" style="background-color:<%= colorPicker1 %>"
                       onClick="showColorPicker(this.id)" value="<%= colorPicker1 %>"
                       onpropertychange="javascript:showColorPicker(this.id)">
                <select name="s1">
                    <% for i = 1 to 100 %>
                    <option <%if i = 24 and s1 = "" then response . Write("selected") end if
                    if int(s1) = i then response . Write("selected") end if %> value="<%= i %>"><%= i %>
                        <% next %>
                    </option>
                </select></td>
        </tr>
        <tr>
            <td width="150" align="right" nowrap>Ԥ�⣺</td>
            <td nowrap><input name="t2" class="inputtext" value="<%= t2 %>" type="text" style="width:200px">
                <input type="text" name="colorPicker2" id="colorPicker2" style="background-color:<%= colorPicker2 %>"
                       onClick="showColorPicker(this.id)" value="<%= colorPicker2 %>"
                       onpropertychange="javascript:showColorPicker(this.id)">
                <select name="s2">
                    <% for i = 1 to 100 %>
                    <option <%if i = 24 and s2 = "" then response . Write("selected") end if
                    if int(s2) = i then response . Write("selected") end if
		%> value="<%= i %>"><%= i %>
                        <% next %>
                    </option>
                </select></td>
        </tr>
        <tr>
            <td align="right" nowrap>����Ф��</td>
            <td nowrap><input name="t3" class="inputtext" value="<%= t3 %>" type="text" style="width:200px">
                <input type="text" name="colorPicker3" id="colorPicker3" style="background-color:<%= colorPicker3 %>"
                       onClick="showColorPicker(this.id)" value="<%= colorPicker3 %>"
                       onpropertychange="javascript:showColorPicker(this.id)">
                <select name="s3">
                    <% for i = 1 to 100 %>
                    <option <%if i = 24 and s3 = "" then response . Write("selected") end if
                    if int(s3) = i then response . Write("selected") end if
		%> value="<%= i %>"><%= i %>
                        <% next %>
                    </option>
                </select></td>
        </tr>
        <tr>
            <td align="right" nowrap>���룺</td>
            <td nowrap><input name="t4" class="inputtext" value="<%= t4 %>" type="text" style="width:200px">
                <input type="text" name="colorPicker4" id="colorPicker4" style="background-color:<%= colorPicker4 %>"
                       onClick="showColorPicker(this.id)" value="<%= colorPicker4 %>"
                       onpropertychange="javascript:showColorPicker(this.id)">
                <select name="s4">
                    <% for i = 1 to 100 %>
                    <option <%if i = 24 and s4 = "" then response . Write("selected") end if
                    if int(s4) = i then response . Write("selected") end if
		%> value="<%= i %>"><%= i %>
                        <% next %>
                    </option>
                </select></td>
        </tr>
        <tr>
            <td align="right" nowrap>���</td>
            <td nowrap><input name="t7" class="inputtext" value="<%= t7 %>" type="text" style="width:200px">
                <input type="text" name="colorPicker7" id="colorPicker7" style="background-color:<%= colorPicker7 %>"
                       onClick="showColorPicker(this.id)" value="<%= colorPicker7 %>"
                       onpropertychange="javascript:showColorPicker(this.id)">
                <select name="s7">
                    <% for i = 1 to 100 %>
                    <option <%if i = 24 and s7 = "" then response . Write("selected") end if
                    if int(s7) = i then response . Write("selected") end if
		%> value="<%= i %>"><%= i %>
                        <% next %>
                    </option>
                </select>
                <script type="text/javascript" src="../javascript/Deepteach_colorPicker.js"></script>
            </td>
        </tr>

        <tr>
            <td>&nbsp;</td>
            <td><input name="submit1" type="submit" class="button" value="ȷ���ύ">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input name="reset" type="reset" class="button" value="ȡ����д"></td>
        </tr>
    </form>
</table>
</body>
</html>
<%
conn . close()
	set conn = nothing
%>
